﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace operater
{
    class Program
    {
        static void Main(string[] args)
        {
            //int r = 5;
            //double pi = 3.14;
            //double s = pi * r * r;
            //double l = 2 * pi * r;
            //Console.WriteLine("s={0},L={1}", s, l);

            //int a = 10;
            //double b = a * 0.88;
            //int c = (int)b;
            //Console.WriteLine( c);

            //Convert 
            //将字符串转换为数字
            //String str = "123";
            //double d = Convert.ToDouble(str);
            //Console.WriteLine(d);
            //Console.WriteLine( Convert.ToInt32(str));
            while (true)
            {
                String input = Console.ReadLine();
                int year = 0;
                try
                {
                    year = Convert.ToInt32(input);
                    if (Program.isLeapYear(year))
                    {
                        Console.WriteLine("{0} is Leap Year.", year);
                    }
                    else
                    {
                        Console.WriteLine("{0} is not Leap Year.", year);
                    }

                }
                catch
                {
                    Console.WriteLine("输入错误！");
                    Console.ReadKey();
                    return;
                }

            }
        }

       /// <summary>
       ///  判断输入是否为闰年
       /// </summary>
       /// <param name="year"></param>
       /// <returns></returns>
        static bool isLeapYear(int year)
        {
            if (year % 400 == 0)
                return true;

            if (year % 100 == 0)
                return false;

            if (year % 4 == 0)
                return true;

            return false;
        }
    }
}
